<%@ page import="vo.TableUsing" %>
<%@ page import="utils.string.date.DateToStringUtil" %>
<%@ page import="utils.string.session.SessionStringUtil" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: Chris
  Date: 2021/5/11
  Time: 21:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>确认归还设备界面</title>
</head>
<body>
<table border="1">
    <tr bgcolor="pink">
        <td>使用编号</td>
        <td>设备名称</td>
        <td>申请人</td>
        <td>数目</td>
        <td>申请理由</td>
        <td>时间</td>
        <td>归还</td>
    </tr>
    <%
        HashMap allTableUsings = (HashMap)session.getAttribute(SessionStringUtil.ALL_USING);
        int tableUsingId = Integer.parseInt(request.getParameter("tableUsingId"));
        TableUsing tableUsing = (TableUsing) allTableUsings.get(tableUsingId);
        String date = DateToStringUtil.DateToString(tableUsing.getUsing_date());
    %>
    <tr bgcolor="yellow">
        <td><%=tableUsing.getUsing_id()%></td>
        <td><%=tableUsing.getEquip_name()%></td>
        <td><%=tableUsing.getUser_name()%></td>
        <td><%=tableUsing.getUsing_num()%></td>
        <td><%=tableUsing.getUsing_reason()%></td>
        <td><%=date%></td>
        <td><a href="servlet/DeleteUsingServlet?using_Id=<%=tableUsing.getUsing_id()%>&equip_id=<%=tableUsing.getEquip_id()%>&equip_num=<%=tableUsing.getUsing_num()%>" methods="post">确认归还</a></td>
    </tr>
</table>
<a href="javascript:history.back(-1)">返回</a>
</body>
</html>
